#{extends 'main.html' /}
#{set title:'BETSAFE HACKATON \'11 - STARS*N' /}
#{addJsPaths ['/public/javascripts/seedrandom.js'.toAssetPath(), '/public/javascripts/gameobjects.js'.toAssetPath(), '/public/javascripts/devices.js'.toAssetPath(), '/public/javascripts/entity.js'.toAssetPath(), '/public/javascripts/stars.js'.toAssetPath()] /}
<style type="text/css" media="screen">
    html, body {
        width:  100%;
        height: 100%;
        margin: 0px;
        padding: 0px;
        background-color: black;
    }
</style>
    <canvas style="" id="gameCanvas" style="border: 0px; margin: 0px; padding: 0px"></canvas>
#{addJsInit}
    $(document).ready(function() {
        var gameCanvas = $("#gameCanvas")[0];
        gameCanvas.width  = window.innerWidth - 4;
        gameCanvas.height = window.innerHeight - 4;
        var stars = new Stars({}, gameCanvas);
        $(window).resize(function() {
            gameCanvas.width  = window.innerWidth - 4;
            gameCanvas.height = window.innerHeight - 4;
            stars.reset();
        });

        stars.start_gameloop();
    });
#{/addJsInit}
